package com.hgdp.medicalexamination.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hgdp.medicalexamination.entity.Enclosure;
import com.hgdp.medicalexamination.mapper.EnclosureMapper;
import com.hgdp.medicalexamination.service.EnclosureService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @param 
 * @author hgdp
 * @date 2020-07-31 09:28:21
 */

@Service
@AllArgsConstructor
public class EnclosureServiceImpl extends ServiceImpl<EnclosureMapper, Enclosure> implements EnclosureService {


	@Override
	public IPage<Enclosure> queryPage(Page page, Enclosure enclosure) {
		IPage<Enclosure> pages =baseMapper.selectPage(page,Wrappers.query(enclosure));
		page.setTotal(baseMapper.selectCount(Wrappers.query(enclosure)));
		return pages;
	}


}